using System;
using System.Collections.Generic;
using System.Text;

namespace testcastle.DAL
{
    using IBatisNet.DataMapper;

    using testcastle.Domain;

    public class AccountDao 
    {
        private SqlMapper _sqlMap;

        public AccountDao(SqlMapper SqlMap)
        {
            _sqlMap = SqlMap;
        }

        #region IAccountDao Members

        public Account GetAccount(int id)
        {
            return _sqlMap.QueryForObject("GetAccount", id) as Account;
        }

        public void InsertAccount(Account account)
        {
            _sqlMap.Insert("InsertAccount", account);
        }

        public void ResetTableAccount()
        {
            _sqlMap.Delete("ResetTableAccount", null);

        }

        #endregion
    }
}
